package com.knight.hadoop.day07.rpc.service;


import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.RPC.Server;

import com.knight.hadoop.day07.rpc.protocol.ClientNameNodeProtocol;

public class PublishServiceUtil {
	public static void main(String[] args) throws Exception {
		 RPC.Builder builder = new RPC.Builder(new Configuration());
		 builder.setBindAddress("localhost")
		 .setPort(8888)
		 .setProtocol(ClientNameNodeProtocol.class)
		 .setInstance(new MyNameNode());
		 
		 Server server = builder.build();
		 server.start();
	}
}
